if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Reverse_FactorFinal_Drug]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Reverse_FactorFinal_Drug]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Sodor_Factor_Drug]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[Sodor_Factor_Drug]


if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SearchKala]') and xtype in (N'FN', N'IF', N'TF'))
drop function [dbo].[SearchKala]